----------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/006489466/Dropbox/BWC/Submission Files/Figs/ResultsLog.log
  log type:  text
 opened on:   6 Jul 2023, 14:16:48

. do "/var/folders/rm/04tctgtx0bxg5jlm6dfv1ql80000gr/T//SD07880.000000"

. la var bodycam2 "Body Camera Adoption"

. 
. 
. 
. menbreg totalsuits bodycam2 aperm ndisad nonwht crimeratel time, ///
> exposure(officers) || agencyid:, irr

Fitting fixed-effects model:

Iteration 0:   log likelihood = -701.33486  
Iteration 1:   log likelihood = -691.28917  
Iteration 2:   log likelihood = -690.45781  
Iteration 3:   log likelihood = -690.45494  
Iteration 4:   log likelihood = -690.45494  

Refining starting values:

Grid node 0:   log likelihood = -667.41114

Fitting full model:

Iteration 0:   log likelihood = -667.41114  (not concave)
Iteration 1:   log likelihood = -664.65998  
Iteration 2:   log likelihood = -653.40886  
Iteration 3:   log likelihood = -643.97912  
Iteration 4:   log likelihood = -643.76675  
Iteration 5:   log likelihood = -643.76664  
Iteration 6:   log likelihood = -643.76664  

Mixed-effects nbinomial regression              Number of obs     =        186
Overdispersion: mean
Group variable: agencyid                        Number of groups  =         19

                                                Obs per group:
                                                              min =          6
                                                              avg =        9.8
                                                              max =         10

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(6)      =      12.80
Log likelihood = -643.76664                     Prob > chi2       =     0.0464
------------------------------------------------------------------------------
  totalsuits |        IRR   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    bodycam2 |   .5715779   .1224049    -2.61   0.009     .3756543    .8696861
       aperm |   1.358999   .2384838     1.75   0.080     .9634875    1.916868
      ndisad |    1.06906   .0529546     1.35   0.178     .9701498    1.178054
      nonwht |   .9867294   .0103143    -1.28   0.201     .9667194    1.007154
  crimeratel |   .9844606   .0778343    -0.20   0.843     .8431404    1.149468
        time |   1.094314   .0338421     2.91   0.004     1.029954    1.162694
       _cons |   .0093273   .0089319    -4.88   0.000     .0014277    .0609358
ln(officers) |          1  (exposure)
-------------+----------------------------------------------------------------
    /lnalpha |  -1.483432   .1613262                     -1.799626   -1.167238
-------------+----------------------------------------------------------------
agencyid     |
   var(_cons)|   .4270501   .1530234                      .2115781    .8619595
------------------------------------------------------------------------------
Note: Estimates are transformed only in the first equation to incidence-rate ratios.
Note: _cons estimates baseline incidence rate (conditional on zero random effects).
LR test vs. nbinomial model: chibar2(01) = 93.38      Prob >= chibar2 = 0.0000

. 
. margins, at(bodycam2=(0(.1)1))

Predictive margins                                         Number of obs = 186
Model VCE: OIM

Expression: Marginal predicted mean, predict()
1._at:  bodycam2 =  0
2._at:  bodycam2 = .1
3._at:  bodycam2 = .2
4._at:  bodycam2 = .3
5._at:  bodycam2 = .4
6._at:  bodycam2 = .5
7._at:  bodycam2 = .6
8._at:  bodycam2 = .7
9._at:  bodycam2 = .8
10._at: bodycam2 = .9
11._at: bodycam2 =  1

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   25.13659   4.966875     5.06   0.000      15.4017    34.87149
          2  |   23.76917    4.49217     5.29   0.000     14.96468    32.57366
          3  |   22.47613   4.102053     5.48   0.000     14.43625      30.516
          4  |   21.25343    3.79105     5.61   0.000     13.82311    28.68375
          5  |   20.09725   3.552307     5.66   0.000     13.13485    27.05964
          6  |   19.00396   3.377437     5.63   0.000     12.38431    25.62362
          7  |   17.97015   3.256782     5.52   0.000     11.58697    24.35333
          8  |   16.99258   3.180044     5.34   0.000      10.7598    23.22535
          9  |   16.06818   3.137083     5.12   0.000     9.919613    22.21675
         10  |   15.19408   3.118624     4.87   0.000     9.081686    21.30647
         11  |   14.36752    3.11671     4.61   0.000     8.258883    20.47616
------------------------------------------------------------------------------

. 
. marginsplot, recast(line) recastci(rarea) 

Variables that uniquely identify margins: bodycam2

. 
. graph export SettleStata.pdf, replace
file /Users/006489466/Dropbox/BWC/Submission Files/Figs/SettleStata.pdf saved as PDF format

. * without detroit
. menbreg totalsuits bodycam2 aperm ndisad nonwht crimeratel time if detmi < 1, ///
> exposure(officers) || agencyid: , irr

Fitting fixed-effects model:

Iteration 0:   log likelihood = -650.94611  
Iteration 1:   log likelihood = -640.85554  
Iteration 2:   log likelihood = -640.23392  
Iteration 3:   log likelihood = -640.23207  
Iteration 4:   log likelihood = -640.23207  

Refining starting values:

Grid node 0:   log likelihood = -618.00809

Fitting full model:

Iteration 0:   log likelihood = -618.00809  (not concave)
Iteration 1:   log likelihood = -615.04621  
Iteration 2:   log likelihood = -597.13876  
Iteration 3:   log likelihood =  -590.3133  
Iteration 4:   log likelihood = -590.22725  
Iteration 5:   log likelihood = -590.22701  
Iteration 6:   log likelihood = -590.22701  

Mixed-effects nbinomial regression              Number of obs     =        176
Overdispersion: mean
Group variable: agencyid                        Number of groups  =         18

                                                Obs per group:
                                                              min =          6
                                                              avg =        9.8
                                                              max =         10

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(6)      =      12.19
Log likelihood = -590.22701                     Prob > chi2       =     0.0579
------------------------------------------------------------------------------
  totalsuits |        IRR   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    bodycam2 |   .5891138   .1153766    -2.70   0.007     .4013223    .8647788
       aperm |   1.255545   .2063881     1.38   0.166     .9097266    1.732822
      ndisad |   1.021951   .0517454     0.43   0.668     .9254023    1.128574
      nonwht |   .9843063   .0101473    -1.53   0.125     .9646176    1.004397
  crimeratel |   .9781495   .0691355    -0.31   0.755     .8516133    1.123487
        time |   1.074242    .031075     2.48   0.013      1.01503    1.136907
       _cons |   .0117815   .0105793    -4.95   0.000      .002027    .0684767
ln(officers) |          1  (exposure)
-------------+----------------------------------------------------------------
    /lnalpha |  -1.795281   .2015799                      -2.19037   -1.400192
-------------+----------------------------------------------------------------
agencyid     |
   var(_cons)|   .4092085   .1489551                      .2004936    .8351965
------------------------------------------------------------------------------
Note: Estimates are transformed only in the first equation to incidence-rate ratios.
Note: _cons estimates baseline incidence rate (conditional on zero random effects).
LR test vs. nbinomial model: chibar2(01) = 100.01     Prob >= chibar2 = 0.0000

. 
. * thousands per suit
. 
. menbreg medamtthousr bodycam2 aperm ndisad nonwht crimeratel offratel time ///
> || agencyid:, irr

Fitting fixed-effects model:

Iteration 0:   log likelihood = -539.90747  
Iteration 1:   log likelihood = -521.61731  
Iteration 2:   log likelihood = -520.02752  
Iteration 3:   log likelihood =  -520.0173  
Iteration 4:   log likelihood =  -520.0173  

Refining starting values:

Grid node 0:   log likelihood = -490.06288

Fitting full model:

Iteration 0:   log likelihood = -490.06288  
Iteration 1:   log likelihood = -463.75072  
Iteration 2:   log likelihood =  -445.4854  
Iteration 3:   log likelihood = -424.20084  
Iteration 4:   log likelihood = -422.15895  
Iteration 5:   log likelihood = -422.12148  
Iteration 6:   log likelihood = -422.12146  

Mixed-effects nbinomial regression              Number of obs     =        186
Overdispersion: mean
Group variable: agencyid                        Number of groups  =         19

                                                Obs per group:
                                                              min =          6
                                                              avg =        9.8
                                                              max =         10

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(7)      =      11.67
Log likelihood = -422.12146                     Prob > chi2       =     0.1119
------------------------------------------------------------------------------
medamtthousr |        IRR   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    bodycam2 |   .6099472   .1393354    -2.16   0.030     .3898029    .9544198
       aperm |   1.373979   .2444326     1.79   0.074     .9695051    1.947197
      ndisad |   1.073632   .0636391     1.20   0.231     .9558743    1.205896
      nonwht |   1.004671   .0158326     0.30   0.767     .9741141    1.036187
  crimeratel |   .9725436   .0815774    -0.33   0.740     .8251063    1.146326
    offratel |   1.358735   .6827701     0.61   0.542     .5074608    3.638037
        time |   1.078255   .0361738     2.25   0.025     1.009636    1.151537
       _cons |   1.733191   2.019771     0.47   0.637     .1765633    17.01345
-------------+----------------------------------------------------------------
    /lnalpha |  -2.670042   .3615012                     -3.378571   -1.961512
-------------+----------------------------------------------------------------
agencyid     |
   var(_cons)|   .9425193   .3230908                      .4813963    1.845346
------------------------------------------------------------------------------
Note: Estimates are transformed only in the first equation to incidence-rate ratios.
Note: _cons estimates baseline incidence rate (conditional on zero random effects).
LR test vs. nbinomial model: chibar2(01) = 195.79     Prob >= chibar2 = 0.0000

. 
. margins, at(bodycam2=(0(.1)1))

Predictive margins                                         Number of obs = 186
Model VCE: OIM

Expression: Marginal predicted mean, predict()
1._at:  bodycam2 =  0
2._at:  bodycam2 = .1
3._at:  bodycam2 = .2
4._at:  bodycam2 = .3
5._at:  bodycam2 = .4
6._at:  bodycam2 = .5
7._at:  bodycam2 = .6
8._at:  bodycam2 = .7
9._at:  bodycam2 = .8
10._at: bodycam2 = .9
11._at: bodycam2 =  1

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   7.129335   2.127716     3.35   0.001     2.959089    11.29958
          2  |   6.785444   1.988433     3.41   0.001     2.888186     10.6827
          3  |    6.45814   1.868666     3.46   0.001     2.795623    10.12066
          4  |   6.146625   1.766728     3.48   0.001     2.683903    9.609347
          5  |   5.850136   1.680859     3.48   0.001     2.555713    9.144559
          6  |   5.567948   1.609248     3.46   0.001     2.413879    8.722017
          7  |   5.299372   1.550066     3.42   0.001     2.261298    8.337445
          8  |   5.043751    1.50151     3.36   0.001     2.100845    7.986656
          9  |    4.80046   1.461853     3.28   0.001     1.935281    7.665639
         10  |   4.568904   1.429485     3.20   0.001     1.767165    7.370644
         11  |   4.348518   1.402946     3.10   0.002     1.598795    7.098242
------------------------------------------------------------------------------

. 
. marginsplot, recast(line) recastci(rarea)

Variables that uniquely identify margins: bodycam2

. 
. graph export CostStata.pdf, replace
file /Users/006489466/Dropbox/BWC/Submission Files/Figs/CostStata.pdf saved as PDF format

. 
. menbreg medamtthousr bodycam2 aperm ndisad nonwht crimeratel offratel time ///
> if detmi < 1 || agencyid:, irr

Fitting fixed-effects model:

Iteration 0:   log likelihood = -504.55738  
Iteration 1:   log likelihood = -485.62907  
Iteration 2:   log likelihood = -483.86859  
Iteration 3:   log likelihood =  -483.8596  
Iteration 4:   log likelihood = -483.85959  

Refining starting values:

Grid node 0:   log likelihood = -458.65735

Fitting full model:

Iteration 0:   log likelihood = -458.65735  (not concave)
Iteration 1:   log likelihood = -444.43975  (not concave)
Iteration 2:   log likelihood = -438.44001  (not concave)
Iteration 3:   log likelihood = -436.85799  (not concave)
Iteration 4:   log likelihood = -433.80691  (not concave)
Iteration 5:   log likelihood = -432.62354  (not concave)
Iteration 6:   log likelihood =   -431.847  (not concave)
Iteration 7:   log likelihood =  -431.0245  (not concave)
Iteration 8:   log likelihood = -428.13083  (not concave)
Iteration 9:   log likelihood = -425.64509  (not concave)
Iteration 10:  log likelihood = -424.62871  (not concave)
Iteration 11:  log likelihood = -423.70545  (not concave)
Iteration 12:  log likelihood = -422.30617  (not concave)
Iteration 13:  log likelihood = -420.85442  (not concave)
Iteration 14:  log likelihood = -417.46972  (not concave)
Iteration 15:  log likelihood =  -415.7661  (not concave)
Iteration 16:  log likelihood =  -390.1795  
Iteration 17:  log likelihood = -381.27565  
Iteration 18:  log likelihood = -376.72756  
Iteration 19:  log likelihood = -376.58796  
Iteration 20:  log likelihood = -376.58633  
Iteration 21:  log likelihood = -376.58633  

Mixed-effects nbinomial regression              Number of obs     =        176
Overdispersion: mean
Group variable: agencyid                        Number of groups  =         18

                                                Obs per group:
                                                              min =          6
                                                              avg =        9.8
                                                              max =         10

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(7)      =      10.21
Log likelihood = -376.58633                     Prob > chi2       =     0.1772
------------------------------------------------------------------------------
medamtthousr |        IRR   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    bodycam2 |   .6656147   .1359407    -1.99   0.046     .4460455    .9932685
       aperm |   1.256387   .1919504     1.49   0.135     .9312732       1.695
      ndisad |   1.069945   .0638251     1.13   0.257     .9518857    1.202646
      nonwht |   1.003724   .0164643     0.23   0.821     .9719681    1.036518
  crimeratel |   .9719305   .0750603    -0.37   0.712     .8354079    1.130764
    offratel |   1.539225   .7502404     0.88   0.376     .5921262    4.001198
        time |   1.065357   .0319616     2.11   0.035      1.00452    1.129879
       _cons |    1.67824   1.944542     0.45   0.655     .1732147    16.26012
-------------+----------------------------------------------------------------
    /lnalpha |  -3.951791   .6552753                     -5.236107   -2.667475
-------------+----------------------------------------------------------------
agencyid     |
   var(_cons)|   .9934156   .3482869                      .4996934     1.97496
------------------------------------------------------------------------------
Note: Estimates are transformed only in the first equation to incidence-rate ratios.
Note: _cons estimates baseline incidence rate (conditional on zero random effects).
LR test vs. nbinomial model: chibar2(01) = 214.55     Prob >= chibar2 = 0.0000

. 
end of do-file

. do "/var/folders/rm/04tctgtx0bxg5jlm6dfv1ql80000gr/T//SD07880.000000"

. log close
      name:  <unnamed>
       log:  /Users/006489466/Dropbox/BWC/Submission Files/Figs/ResultsLog.log
  log type:  text
 closed on:   6 Jul 2023, 14:17:30
----------------------------------------------------------------------------------------------
